Below is code to perform a real-time hardware feedhold.
"Stop" might be implimented by disabling your axes.
We don't currently have a mechanism for Execute. You could call ResumeCoordinatedMotion() to continue execution from a feedhold.
#include "KMotionDef.h"
main()
{
for (;;) // loop forever
{
WaitNextTimeSlice();
if (ReadBit(46)) // Watch an external input switch
{
StopCoordinatedMotion(); //feedhold
}
}
}